package com.qianfeng.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 考勤表
 */
public class Attendance {

  private Integer attendanceId;
  private Integer empId;
  private Employee employee;
  private Integer workTypeId;
  private WorkType workType;
  @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  private Date startTime;
  @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  private Date endTime;
  private Integer days;
  private String resultStatus;

  @Override
  public String toString() {
    return "Attendance{" +
            "attendanceId=" + attendanceId +
            ", empId=" + empId +
            ", employee=" + employee +
            ", workTypeId=" + workTypeId +
            ", workType=" + workType +
            ", startTime=" + startTime +
            ", endTime=" + endTime +
            ", days=" + days +
            ", resultStatus='" + resultStatus + '\'' +
            '}';
  }

  public Integer getAttendanceId() {
    return attendanceId;
  }

  public void setAttendanceId(Integer attendanceId) {
    this.attendanceId = attendanceId;
  }

  public Integer getEmpId() {
    return empId;
  }

  public void setEmpId(Integer empId) {
    this.empId = empId;
  }

  public Employee getEmployee() {
    return employee;
  }

  public void setEmployee(Employee employee) {
    this.employee = employee;
  }

  public Integer getWorkTypeId() {
    return workTypeId;
  }

  public void setWorkTypeId(Integer workTypeId) {
    this.workTypeId = workTypeId;
  }

  public WorkType getWorkType() {
    return workType;
  }

  public void setWorkType(WorkType workType) {
    this.workType = workType;
  }

  public Date getStartTime() {
    return startTime;
  }

  public void setStartTime(Date startTime) {
    this.startTime = startTime;
  }

  public Date getEndTime() {
    return endTime;
  }

  public void setEndTime(Date endTime) {
    this.endTime = endTime;
  }

  public Integer getDays() {
    return days;
  }

  public void setDays(Integer days) {
    this.days = days;
  }

  public String getResultStatus() {
    return resultStatus;
  }

  public void setResultStatus(String resultStatus) {
    this.resultStatus = resultStatus;
  }

  public Attendance() {
  }

  public Attendance(Integer attendanceId, Integer empId, Employee employee, Integer workTypeId, WorkType workType, Date startTime, Date endTime, Integer days, String resultStatus) {
    this.attendanceId = attendanceId;
    this.empId = empId;
    this.employee = employee;
    this.workTypeId = workTypeId;
    this.workType = workType;
    this.startTime = startTime;
    this.endTime = endTime;
    this.days = days;
    this.resultStatus = resultStatus;
  }
}
